package com.sky.service.impl;

import com.sky.mapper.DishFlavorMapper;
import com.sky.mapper.DishMapper;
import com.sky.mapper.UserDishMapper;
import com.sky.service.UserDishService;
import com.sky.vo.DishVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Slf4j

public class UserDishServiceImpl implements UserDishService {
 @Autowired
    private UserDishMapper userDishMapper;
 @Autowired
    private DishFlavorMapper dishFlavorMapper;
    @Override
    @Transactional
    public List<DishVO> list(Integer categoryId) {
        return userDishMapper.DishWithFlavorList(categoryId);
    }
}
